package com.css.dzj.dzjportal.modules.supervision.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * 监管事项清单
 */
@Entity
@Table(name = "supervision_matter", schema = "DZJPORTAL", catalog = "")
public class SupervisionMatterEntity {
    //主键Id
    private String id;
    //监管部门
    private String supervisionDept;
    //监管事项编号
    private String supervisionNumber;
    //监管事项名称
    private String supervisionName;
    //对应的许可事项名称
    private String permitName;
    //对应的许可事项类型
    private String permitType;
    //监管事项子项
    private String supervisionSubItem;
    //监管对象
    private String supervisionObject;
    //监管形式
    private String supervisionForm;
    //监管方式
    private String supervisionWay;
    //监管流程
    private String supervisionProcess;
    //监管结果
    private String supervisionResult;
    //监管层级
    private String supervisionRank;
    //设定依据
    private String settingBasis;
    //创建人
    private String createPerson;
    //创建时间
    private Date createTime;
    //修改人
    private String updatePerson;
    //修改时间
    private Date updateTime;
    //删除标记
    private String delFlag;
    // 是否公开 0：是 1：否
    private String isPublic;
    //公开位置
    private String publicLocation;
    // 0：待公开  1：已公开
    private String status;
    // 对应的业务系统连接
    private String linkUrl;

    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "idGenerator")
    @GenericGenerator(name = "idGenerator", strategy = "com.css.dzj.dzjportal.common.util.SnowflakeId")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "supervision_dept")
    public String getSupervisionDept() {
        return supervisionDept;
    }

    public void setSupervisionDept(String supervisionDept) {
        this.supervisionDept = supervisionDept;
    }

    @Basic
    @Column(name = "supervision_number")
    public String getSupervisionNumber() {
        return supervisionNumber;
    }

    public void setSupervisionNumber(String supervisionNumber) {
        this.supervisionNumber = supervisionNumber;
    }

    @Basic
    @Column(name = "supervision_name")
    public String getSupervisionName() {
        return supervisionName;
    }

    public void setSupervisionName(String supervisionName) {
        this.supervisionName = supervisionName;
    }

    @Basic
    @Column(name = "permit_name")
    public String getPermitName() {
        return permitName;
    }

    public void setPermitName(String permitName) {
        this.permitName = permitName;
    }

    @Basic
    @Column(name = "permit_type")
    public String getPermitType() {
        return permitType;
    }

    public void setPermitType(String permitType) {
        this.permitType = permitType;
    }

    @Basic
    @Column(name = "supervision_sub_item")
    public String getSupervisionSubItem() {
        return supervisionSubItem;
    }

    public void setSupervisionSubItem(String supervisionSubItem) {
        this.supervisionSubItem = supervisionSubItem;
    }

    @Basic
    @Column(name = "supervision_object")
    public String getSupervisionObject() {
        return supervisionObject;
    }

    public void setSupervisionObject(String supervisionObject) {
        this.supervisionObject = supervisionObject;
    }

    @Basic
    @Column(name = "supervision_form")
    public String getSupervisionForm() {
        return supervisionForm;
    }

    public void setSupervisionForm(String supervisionForm) {
        this.supervisionForm = supervisionForm;
    }

    @Basic
    @Column(name = "supervision_way")
    public String getSupervisionWay() {
        return supervisionWay;
    }

    public void setSupervisionWay(String supervisionWay) {
        this.supervisionWay = supervisionWay;
    }

    @Basic
    @Column(name = "supervision_process")
    public String getSupervisionProcess() {
        return supervisionProcess;
    }

    public void setSupervisionProcess(String supervisionProcess) {
        this.supervisionProcess = supervisionProcess;
    }

    @Basic
    @Column(name = "supervision_result")
    public String getSupervisionResult() {
        return supervisionResult;
    }

    public void setSupervisionResult(String supervisionResult) {
        this.supervisionResult = supervisionResult;
    }

    @Basic
    @Column(name = "supervision_rank")
    public String getSupervisionRank() {
        return supervisionRank;
    }

    public void setSupervisionRank(String supervisionRank) {
        this.supervisionRank = supervisionRank;
    }

    @Basic
    @Column(name = "setting_basis")
    public String getSettingBasis() {
        return settingBasis;
    }

    public void setSettingBasis(String settingBasis) {
        this.settingBasis = settingBasis;
    }

    @Basic
    @Column(name = "create_person")
    public String getCreatePerson() {
        return createPerson;
    }

    public void setCreatePerson(String createPerson) {
        this.createPerson = createPerson;
    }

    @Basic
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_person")
    public String getUpdatePerson() {
        return updatePerson;
    }

    public void setUpdatePerson(String updatePerson) {
        this.updatePerson = updatePerson;
    }

    @Basic
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "del_flag")
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Basic
    @Column(name = "is_public")
    public String getIsPublic() {
        return isPublic;
    }

    public void setIsPublic(String isPublic) {
        this.isPublic = isPublic;
    }

    @Basic
    @Column(name = "public_location")
    public String getPublicLocation() {
        return publicLocation;
    }

    public void setPublicLocation(String publicLocation) {
        this.publicLocation = publicLocation;
    }

    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "link_url")
    public String getLinkUrl() {
        return linkUrl;
    }

    public void setLinkUrl(String linkUrl) {
        this.linkUrl = linkUrl;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SupervisionMatterEntity that = (SupervisionMatterEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(supervisionDept, that.supervisionDept) &&
                Objects.equals(supervisionNumber, that.supervisionNumber) &&
                Objects.equals(supervisionName, that.supervisionName) &&
                Objects.equals(permitName, that.permitName) &&
                Objects.equals(permitType, that.permitType) &&
                Objects.equals(supervisionSubItem, that.supervisionSubItem) &&
                Objects.equals(supervisionObject, that.supervisionObject) &&
                Objects.equals(supervisionForm, that.supervisionForm) &&
                Objects.equals(supervisionWay, that.supervisionWay) &&
                Objects.equals(supervisionProcess, that.supervisionProcess) &&
                Objects.equals(supervisionResult, that.supervisionResult) &&
                Objects.equals(supervisionRank, that.supervisionRank) &&
                Objects.equals(settingBasis, that.settingBasis) &&
                Objects.equals(createPerson, that.createPerson) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(updatePerson, that.updatePerson) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(delFlag, that.delFlag) &&
                Objects.equals(isPublic, that.isPublic) &&
                Objects.equals(publicLocation, that.publicLocation) &&
                Objects.equals(status, that.status) &&
                Objects.equals(linkUrl, that.linkUrl);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, supervisionDept, supervisionNumber, supervisionName, permitName, permitType, supervisionSubItem, supervisionObject, supervisionForm, supervisionWay, supervisionProcess, supervisionResult, supervisionRank, settingBasis, createPerson, createTime, updatePerson, updateTime, delFlag, isPublic, publicLocation, status, linkUrl);
    }
}
